<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>HSBToRGB</title>
</head>

<body>
    <p id="res"></p>
    <script>
        const HSBToRGB = (h, s, b) => {
            s /= 100;
            b /= 100;
            const k = i => (i + h / 60) % 6;
            const f = n => b * (1 - s * Math.max(0, Math.min(k(n), 4 - k(n), 1)));
            return [255 * f(5), 255 * f(3), 255 * f(1)];
        };
        const res = document.getElementById('res');
        res.innerHTML = `HSBToRGB(18, 81, 99);的结果是:${JSON.stringify(HSBToRGB(18, 81, 99))}`;
    </script>
</body>

</html>